package br.com.felix.clearcase.command;

import br.com.felix.easyclearcase.EasyClearCaseFile;
import br.com.felix.easyclearcase.EasyClearCaseFile.ClearCaseStatus;

/**
 * This command encapsulates the cleartool undocheckout command.
 * Target file must be checked out.
 * */
public class Undocheckout extends ClearToolCommand{


	/**
	 * Instantiates a new command.
	 * @param file is the file to be undocheckedout.
	 * */
	public Undocheckout(EasyClearCaseFile file) {
		this.file = file;
	}


	/**
	 * @see ClearToolCommand#toCommandLine()
	 * */
	@Override
	public String toCommandLine() {
		return "cleartool uncheckout -rm \""+file.getAbsolutePath()+"\"";
	}


	@Override
	public String getCommandName() {
		return "Undo checkout";
	}


	@Override
	public ClearCaseStatus getStatusAfterExecution() {
		// TODO Auto-generated method stub
		return ClearCaseStatus.FILE_ELEMENT;
	}
}
